import { presetUni } from '@uni-helper/unocss-preset-uni'
import { defineConfig, presetIcons } from 'unocss'

export default defineConfig({
  presets: [
    presetUni(),
    presetIcons({
      scale: 1.2,
      warn: true,
      extraProperties: {
        'display': 'inline-block',
        'vertical-align': 'middle',
      },
    }),
  ],
  shortcuts: [
    ['f-c-c', 'flex items-center justify-center'],
    ['wh-full', 'w-full h-full'],
    ['auto-text', 'color-dark dark:color-light'],
    ['auto-bg', 'bg-white dark:bg-dark'],
  ],
  rules: [
    ['p-safe', { padding: 'var(--status-bar-height) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)' }],
    ['pt-safe', { 'padding-top': 'var(--status-bar-height)' }],
    ['pb-safe', { 'padding-bottom': 'env(safe-area-inset-bottom)' }],
  ],
  theme: {
    colors: {
      primary: '#0070f3',
    },
  },
})
